#import <UIKit/UIKit.h>

extern "C" CFStringRef UIDateFormatStringForFormatType(CFStringRef type);

#define localize(bundle, str) [bundle localizedStringForKey:str value:str table:nil]
#define localizeGlobal(str) [self.plugin.globalBundle localizedStringForKey:str value:str table:nil]

#ifdef DEBUG
#define DebugLog(s, ...) NSLog(s, ##__VA_ARGS__)
#else
#define DebugLog(s, ...)
#endif


@class LIPlugin;
@class SBApplication;


@interface PIPlugin : NSObject <LIPluginController, LITableViewDelegate, UITableViewDataSource> 
{
	NSTimeInterval lastUpdate;
}

-(void)dealloc;

-(NSString*) iconPathFromAction:(int)action;
-(UIColor*) colorFromAction:(int)action;
-(UIColor*) colorFromImportance:(int)importance;


@property (nonatomic, retain) LIPlugin* plugin;
@property (retain) NSDictionary* todoPrefs;
@property (retain) NSArray* todoList;

@property (retain) NSString* lastSql;
@property (retain) NSString* lastPrefs;
@property (retain) NSString* prefsPath;
@property (retain) NSString* appPath;
@property (retain) NSString* dbPath;

@property (retain) UIColor* topColor;
@property (retain) UIColor* highColor;
@property (retain) UIColor* normalColor;
@property (retain) UIColor* lowColor;
@property (retain) UIColor* overdueColor;

@end
